package com.qingcloud.adminbackend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.qingcloud.adminbackend.base.AjaxResult;
import com.qingcloud.adminbackend.entity.source.DataSource;
import com.qingcloud.adminbackend.entity.source.DataSourceDatabaseDto;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author wangjinnan
 * @since 2021-03-17
 */
public interface IDataSourceService extends IService<DataSource> {

    List<DataSource> findAll();

    List<DataSourceDatabaseDto> findAllDsDb();

    AjaxResult addDatasource(DataSource dataSource);

    AjaxResult deleteDatasourceByIds(String ids);

    AjaxResult updateDatasource(DataSource dataSource);

    AjaxResult copyDatasourceById(String id);

    AjaxResult<List<DataSource>> findDatasourceByIds(String ids);

    AjaxResult<List<DataSource>> findDatasourceByName(String name, String projectId);

    AjaxResult<List<DataSource>> findDatasourceByProjectId(String projectId);

    AjaxResult<List<Map<String, Object>>> getTypes();
}
